Dynamically assign a variable depending on window and DOM-element in TypeScript

welcome to shbcf.ru